<?php


namespace BoojasrFramework\ServicesContainer\Event;




use BoojasrFramework\Response\Response;
use BoojasrFramework\ServicesContainer\HttpKernelInterface;
use BoojasrFramework\ServicesContainer\Request;

class ResponseEvent extends KernelEvent
{
    private $response;

    public function __construct(HttpKernelInterface $kernel, Request $request, int $requestType, Response $response)
    {
        parent::__construct($kernel, $request, $requestType);

        $this->setResponse($response);
    }

    /**
     * Returns the current response object.
     *
     * @return Response
     */
    public function getResponse()
    {
        return $this->response;
    }

    /**
     * Sets a new response object.
     */
    public function setResponse(Response $response)
    {
        $this->response = $response;
    }


}